<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2017/8/14 0014
 * Time: 16:45
 */
namespace app\index\validate;

use think\Validate;

class Admin extends Validate
{
    protected $rule =   [
        'username'  => 'require|max:10',
        'password'   => 'number|between:1,120',
        //'ncname' => 'email',
        //'phone' => 'email',
    ];

    protected $message  =   [
        'usernaem.require' => '用户名称必须填写',
        'username.max'     => '名称最多不能超过10个字符',
        'password.number'   => '年龄必须是数字',
        //'age.between'  => '年龄只能在1-120之间',
        //'email'        => '邮箱格式错误',
    ];

}